<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>SandDance-Specs test</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://unpkg.com/vega@^5.20/build/vega.js" charset="utf-8"></script>
    <style>
        body {
            font-family: sans-serif;
        }

        header {
            margin-bottom: 1em;
        }
        main {
            display: grid;
            grid-template-columns: auto 300px;
        }
        .sidebar label {
            display: block;
            padding-top: 1em;
        }
        textarea {
            box-sizing: border-box;
            width: 100%;
            height: 100%;
        }
        .sidebar {
            display: grid;
            grid-template-rows: auto auto;
        }
        .sidebar > div {
            display: grid;
            grid-template-rows: 0fr auto 40px;
        }
        #vega-spec {
            border: 1px solid #ccc;
            max-height: 600px;
            overflow: scroll;            
        }
    </style>
</head>

<body>
    <header>
        <h1>SandDance-Specs test</h1>
        <label>
            Insight file:
            <select id="select-spec">
                <option>column-facet-cross.json</option>
                <option>column-facet-wrap.json</option>
                <option>column.json</option>
                <option>density-facet-cross.json</option>
                <option>density-facet-wrap.json</option>
                <option>density.json</option>
                <option>scatter-facet-cross.json</option>
                <option>scatter-facet-wrap.json</option>
                <option>scatter.json</option>
                <option>stacks-facet-cross.json</option>
                <option>stacks-facet-wrap.json</option>
                <option>stacks-not-faceted.json</option>
            </select>
        </label>
    </header>

    <main>
        <div id="vis"></div>
        <div class="sidebar">
            <div>
                <label>Insight json input</label>
                <textarea id="insight-json"></textarea>
                <button id="insight-update">update</button>
            </div>
            <div>
                <label>Vega spec output</label>
                <textarea id="vega-spec"></textarea>
                <button id="vega-spec-copy">copy</button>
            </div>
        </div>
    </main>

    <script src="js/sanddance-specs.js"></script>
</body>

</html>